package com.zhonghui.mes.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;

import com.zhonghui.mes.domain.vo.MesProductInspectorVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zhonghui.common.annotation.Log;
import com.zhonghui.common.core.controller.BaseController;
import com.zhonghui.common.core.domain.AjaxResult;
import com.zhonghui.common.enums.BusinessType;
import com.zhonghui.mes.domain.MesProductInspector;
import com.zhonghui.mes.service.IMesProductInspectorService;
import com.zhonghui.common.utils.poi.ExcelUtil;
import com.zhonghui.common.core.page.TableDataInfo;

/**
 * 制造执行MES-质量管理-质量报告Controller
 * 
 * @author zhonghui
 * @date 2023-12-13
 */
@RestController
@RequestMapping("/mes/inspection")
public class MesProductInspectorController extends BaseController
{
    @Autowired
    private IMesProductInspectorService mesProductInspectorService;

    /**
     * 查询制造执行MES-质量管理-质量报告列表
     */
    @PreAuthorize("@ss.hasPermi('mes:inspection:list')")
    @GetMapping("/list")
    public TableDataInfo list(MesProductInspectorVo mesProductInspector)
    {
        startPage();
        List<MesProductInspectorVo> list = mesProductInspectorService.selectMesProductInspectorList(mesProductInspector);
        return getDataTable(list);
    }


    /**
     * 获取制造执行MES-质量管理-质量报告详细信息
     */
    @PreAuthorize("@ss.hasPermi('mes:inspection:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(mesProductInspectorService.selectMesProductInspectorById(id));
    }

}
